﻿#include "stdafx.h"
#include "AstGet.h"
#include "AstType.h"
#include "SiContext.h"

CodeGen * AstGet::makeGen(SiContext * parent)
{												 	
	auto* p=parent->findSymbolValue(name);
	if (!p) throw std::runtime_error("找不到变量:" + name);
	return p;
}

void AstGet::draw(std::ostream & os) {
	dotLable(os, "Get " +(right ? name : "const " + name));
}
